<!doctype html>  
<html lang="en">  
<head>  
    <meta charset="UTF-8">  
    <title>弹窗</title>  
    <link rel="stylesheet" type="text/css" href="css/style.css">  
      
</head>  
<body>  
	<div>
  <input type="text" name="phonenumber" placeholder="请输入您的手机号码" />
  <input type="text" name="verify" placeholder="请输入验证码" /><input type="button" value="发送验证码" class="verify_code" />
  <input type="button" name="btn" placeholder="立即领取" class="btn" />
</div>
<!--弹出层-->
<div class="layer" style="display:none">
    <p>领取成功</p>
    <img src="img/close-btn.png" class="close-btn">
</div>
    <button id="open_btn" class="btn">弹窗</button>  
    <button onclick="openwin()">弹窗</button> 
    <!-- 弹窗内容开始 -->  
    <div id="background" class="back">  
        <div id="div1" class="content">  
            <div id="close">  
                <span id="close-button">×</span>  
                <h2>弹窗头部</h2>  
            </div>  
            <div id="div2">  
                <h3>弹窗标题</h3>  
                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Iste, ullam, nisi, enim laboriosam ea cum necessitatibus ipsum cupiditate neque soluta qui autem odit eligendi blanditiis voluptatem repellat suscipit quia perspiciatis.</p>  
            </div>  
            <h3 id="foot">底部内容</h3>  
        </div>  
    </div>  
    <script>
    
    function openwin(){
    
    OpenWindow=window.open("", "newwin", "height=250, width=250,toolbar=no,scrollbars="+scroll+",menubar=no");
    
    //写成一行
    
    OpenWindow.document.write("<title>例子</title>")
    
    OpenWindow.document.write("<body bgcolor=#ffffff>")
    
    OpenWindow.document.write("<h1>Hello!</h1>")
    
    OpenWindow.document.write("New window opened!")
    
    OpenWindow.document.write("< /body>")
    
    OpenWindow.document.write("</html>")
    
    OpenWindow.document.close()
    
    }
    
    </script>
    <!-- 弹窗内容结束 -->  
    <script src="js/style.js"></script>  
</body>  
</html>  